package dominion.player;

import dominion.Dominion;
import dominion.kingdom.Smithy;

public class OneSmithyPlayer extends TresureOnlyPlayer {

	boolean buy = false;

	public OneSmithyPlayer(Dominion dominion) {
		this("OneSmithy", dominion);
	}

	public OneSmithyPlayer(String name, Dominion dominion) {
		super(name, dominion);
	}

	@Override
	public int buy(Dominion dominion, int value) {
		if (buy == false && 3 < value) {
			dominion.buy(this, new Smithy());
			buy = true;
		} else {
			super.buy(dominion, value);
		}
		return 0;
	}

}
